<admintpl file="header" />
</head>
<body>
    <div class="wrap js-check-wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a href="{:U('Balance/index')}">用户余额</a></li>
        </ul>
        <form class="well form-search js-ajax-form" method="post" action="{:U('Balance/index')}">
            余额大于:
            <input type="text" name="keyword" value="{:I('param.keyword')}" >
            <input type="submit" class="btn btn-primary" value="搜索" />
            <if condition="$count" >共查询到 {$count} 条数据</if>
        	<button class="btn btn-primary js-ajax-submit" type="submit" data-action="{:U('Balance/amountcsv')}">查询导出</button>

        </form>
            <table class="table table-hover table-bordered" style="word-break:break-all;">
                <thead>
                    <tr>
                        <th width="60">id</th>
						<th width="40">头像</th>
						<th>用户名/昵称</th>
						<th>电话/地址</th>
						<th>注册日期/登录时间</th>
						<th>IP/余额(元)</th>
						<th width="30">操作</th>
                    </tr>
                </thead>
                <foreach name="uwallets" item="uw">
                    <tr>
                        <td>{$uw.real_user_id}</td>
		                <foreach name="rusers" item="ru">
		                	<if condition="$uw['real_user_id'] eq $ru['id']">
							<td style="padding: 0;margin: 0;"><if condition="$ru['weixin_avatar']"><img src="{$ru['weixin_avatar']}"/></if></td>
							<td>{$ru.username}<br>{$ru.nickname}</td>
							<td>{$ru.phone}<br>{$ru.address}</td>
							<td>{$ru.created_at}<br>{$ru.last_login}</td>
							<td>{$ru.last_login_ip}<br>{$uw['money']/100}（元）</td>
							<td>
								<a href="{:U('Balance/edit',array('id'=>$ru['id']))}">查看</a>
							</td>
							</if>
		                </foreach>
                    </tr>
                </foreach>
                <thead>
                    <tr>
                        <th width="60">id</th>
						<th width="40">头像</th>
						<th>用户名/昵称</th>
						<th>电话/地址</th>
						<th>注册日期/登录时间</th>
						<th>IP/余额(元)</th>
						<th width="30">操作</th>
                    </tr>
                </thead>
            </table>
            <div class="pagination">{$page}</div>
    </div>
    <script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
